package com.homework.hw1028;

public class Person {
    private String name;
    private int score;
    private String result;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getScore() {
        return score;
    }

    public void setScore(int score) {
        this.score = score;
    }

    public String getResult() {
        return result;
    }

    public void setResult(String result) {
        this.result = result;
    }

    public String ppunch(int choice) {
        if (choice == 1) {
            this.setResult("剪刀");
        } else if (choice == 2) {
            this.setResult("石头");
        } else if (choice == 3) {
            this.setResult("布");
        } else {
            this.setResult("输入错误");
        }
        return this.getResult();
    }
}

